package com.song.tools.songtest.beans.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统日志表新增请求体
 * </p>
 *
 * @author song tools
 * @since 2024-07-16
 */
@Data
@Schema(title = "SystemLogSaveRequest", description = "系统日志表新增请求体")
public class SystemLogSaveRequest implements Serializable {

    @Serial
    private static final long serialVersionUID = -1;

    /**
     * 日志唯一值
     */
    @Schema(title = "logId", description = "日志唯一值")
    private String logId;

    /**
     * 操作ip
     */
    @Schema(title = "requestIp", description = "操作ip")
    private String requestIp;

    /**
     * 日志类型:error=错误日志,info=正常日志
     */
    @Schema(title = "logType", description = "日志类型:error=错误日志,info=正常日志")
    private String logType;

    /**
     * 操作描述
     */
    @Schema(title = "description", description = "操作描述")
    private String description;

    /**
     * 类路径
     */
    @Schema(title = "classPath", description = "类路径")
    private String classPath;

    /**
     * 方法名
     */
    @Schema(title = "actionMethod", description = "方法名")
    private String actionMethod;

    /**
     * 请求类型，比如GET、POST等
     */
    @Schema(title = "httpMethod", description = "请求类型，比如GET、POST等")
    private String httpMethod;

    /**
     * 请求报文
     */
    @Schema(title = "requestParam", description = "请求报文")
    private String requestParam;

    /**
     * 响应报文
     */
    @Schema(title = "responseParam", description = "响应报文")
    private String responseParam;

    /**
     * 请求路径
     */
    @Schema(title = "requestUri", description = "请求路径")
    private String requestUri;

    /**
     * 开始时间
     */
    @Schema(title = "startTime", description = "开始时间")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @Schema(title = "endTime", description = "结束时间")
    private LocalDateTime endTime;

    /**
     * 耗时（单位：毫秒）
     */
    @Schema(title = "costTime", description = "耗时（单位：毫秒）")
    private Long costTime;

    /**
     * 错误信息
     */
    @Schema(title = "error", description = "错误信息")
    private String error;

    /**
     * 创建人
     */
    @Schema(title = "createUser", description = "创建人")
    private String createUser;

    /**
     * 创建人ID
     */
    @Schema(title = "createUserId", description = "创建人ID")
    private String createUserId;

}
